package com.wxy.common.rsp;

/**
 * FailedRsp 失败响应
 *
 * @author wxy
 * @since 2023-01-07
 */
public class FailedRsp<T> extends Rsp {
    /**
     * code: 响应编码
     */
    private T code;

    /**
     * 响应信息
     */
    private String message;

    public static <T> FailedRsp<T> failed(T code, String message) {
        FailedRsp<T> rsp = new FailedRsp<>();
        rsp.code = code;
        rsp.message = message;

        return rsp;
    }

    public T getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
